package com.xxx.gmail.DB;

import java.sql.Connection;
import java.sql.DriverManager;

public class ConnectionFactory {

	public static Connection conn = null;

	private ConnectionFactory() {

	}

	public static Connection getConnection() {
		if (conn == null) {
			try {
				Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
				String url = "jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=mydb.mdb";
				conn = DriverManager.getConnection(url, "", "");
			} catch (Exception e) {
				// TODO: handle exception
			}
		}
		return conn;
	}

}
